package com.cyz.user.controller;

import com.cyz.user.userService.PathService;
import com.cyz.common.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "用户端学习路径相关接口")
@RestController
@RequestMapping("/path")
public class PathController {

    @Autowired
    private PathService pathService;

    @ApiOperation(value = "查询学习路径")
    @GetMapping("/queryPaths")
    public R queryPath(){
        return pathService.queryPaths();
    }

    @ApiOperation(value = "查询学习路径及其课程")
    @GetMapping("/queryPathsAndCards")
    public R queryPathsAndCards(){
        return pathService.queryPathsAndCards();
    }
}
